﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Testudo.Core;

public class SiteNodeConfig : CellConfig
{
    public List<PlcDataField> Fields { get; set; }
}

public class PlcDataField
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string Address { get; set; }
    public FieldType Type { get; set; }
    public int? WaitValue { get; set; }
}

[JsonConverter(typeof(StringEnumConverter))]
public enum FieldType
{
    Bool = 1,
    //Byte,
    Int16,
    UInt16,
    Int32,
    UInt32,
    Long,
    ULong,
    Float,
    Double,
    String,
}